import logging
logging.info( 'Loading the module' )
from sugar.activity.Activity import Activity

import sys, os
import gtk

class HelloWorldActivity(Activity):
	# This is a callback function. The data arguments are ignored
	# in this example. More on callbacks below.
	def hello(self, widget, data=None):
		logging.info('Hello World')

	def __init__(self):
		Activity.__init__(self)

		# Creates a new button with the label "Hello World".
		self.button = gtk.Button("OLPC Rules")

		# When the button receives the "clicked" signal, it will call the
		# function hello() passing it None as its argument.  The hello()
		# function is defined above.
		self.button.connect("clicked", self.hello, None)

		# This packs the button into ourselves (a Sugar window).
		self.add(self.button)

		# The final step is to display this newly created widget.
		self.button.show()

		self.set_title('Hello World')
